import {RoutesRecord} from "@/types/router.ts";
import {DefaultLayout} from "@/components/index.ts";


export const routes: RoutesRecord = [
    {
        path: "/",
        name: "default-redirect",
        redirect: "/dashboard"
    },
    {
        path: "/",
        name: "error-page",
        component: DefaultLayout,
        children: [
            {
                path: "/403",
                name: "access-denied",
                meta: {
                    title: "无权限"
                },
                component: () => import("@/views/error-page/403/index.vue")
            },
            {
                path: "/404",
                name: "not-found",
                meta: {
                    title: "404"
                },
                component: () => import("@/views/error-page/404/index.vue")
            },
        ]
    },
    {
        path: "/login",
        name: "login",
        meta: {
            title: "登录",
        },
        component: () => import("@/views/login/index.vue")
    },
    {
        path: "/",
        name: "default",
        component: DefaultLayout,
        children: [
            {
                path: "/dashboard",
                name: "dashboard",
                meta: {
                    title: "仪表盘",
                    icon: 'lucide:layout-dashboard'
                },
                component: () => import("@/views/dashboard/index.vue")
            },
            {
                path: "/user-profile",
                name: "user-profile",
                meta: {
                    title: "个人中心",
                    icon: 'lucide:contact-round'
                },
                component: () => import("@/views/user-profile/index.vue")
            }
        ]
    }
]
